package cn.com.chengq.service.impl;

import cn.com.chengq.service.SomeService;

import java.util.ArrayList;
import java.util.List;

public class SomeServiceImpl implements SomeService {

    @Override
    public void doSome(String name, Integer age) {
        System.out.println("SomeServiceImpl::doSome -> 添加用户");
    }

    @Override
    public List doOther(String name, Integer age) {
        System.out.println("SomeServiceImpl::doOther -> 添加其他");
        List result = new ArrayList<String>();
        result.add("OK");
        return result;
    }

    @Override
    public Integer doInteger(String name, Integer age) {
        System.out.println("SomeServiceImpl::doInteger -> 添加数值");
        return 50;
    }

    @Override
    public String doFirst(String name, Integer age) {
        System.out.println("SomeServiceImpl::doInteger -> 第一个执行的任务");
        return "OK";
    }

    @Override
    public String doSecond(String name, Integer age) {
        System.out.println("SomeServiceImpl::doInteger -> 第二个执行的任务");
        return "OK";
    }

    @Override
    public String doThird(String name, Integer age) {
        System.out.println("SomeServiceImpl::doInteger -> 第三个执行的任务");
        float i = 10/0;
        return "OK";
    }

    @Override
    public Integer addNumber(Integer a, Integer b, Integer c) {
        System.out.println("Execute addNumber");
        return a + b + c;
    }
}
